package com.doone.telmarket.domain;

import java.io.Serializable;

/**
 * 
 * @author 吴同庆
 * @date 2009-9-18
 * @description 站点目录
 * @package     com.doone.telmarket.domain
 */
public class SiteDirectory implements Serializable {

	private static final long serialVersionUID = 3754357160931277580L;
	private static final String PAGE_DIRECTORY_NAME = "web";
	private static final String IMAGE_DIRECTORY_NAME = "images";
	private static final String FLASH_DIRECTORY_NAME = "flash";
	private static final String SERVICE_DIRECTORY_NAME = "service";

	public static final SiteDirectory PAGE_DIRECTORY = new SiteDirectory(PAGE_DIRECTORY_NAME);
	public static final SiteDirectory IMAGE_DIRECTORY = new SiteDirectory(IMAGE_DIRECTORY_NAME);
	public static final SiteDirectory FLASH_DIRECTORY = new SiteDirectory(FLASH_DIRECTORY_NAME);
	public static final SiteDirectory SERVICE_DIRECTORY = new SiteDirectory(SERVICE_DIRECTORY_NAME);

	private String name;

	public String getName() {
		return name;
	}

	private SiteDirectory(String name) {
		this.name = name;
	}
	
	public SiteDirectory(){}
	
	public SiteDirectory createSiteDirectory(String type){
		if(PAGE_DIRECTORY_NAME.equals(type)){
			return PAGE_DIRECTORY;
		}else if(IMAGE_DIRECTORY_NAME.equals(type)){
			return IMAGE_DIRECTORY;
		}else if(FLASH_DIRECTORY_NAME.equals(type)){
			return FLASH_DIRECTORY;
		}else{
			return SERVICE_DIRECTORY;
		}
	}

}
